package com.saianfu.flowable.attendence

import org.junit.jupiter.api.Test

import org.junit.jupiter.api.Assertions.*

internal class ApplyConditionUtilTest {

    @Test
    fun getApproveLayerList() {
//        testManager15()
//        testManager14()
//        testManager13()
//        testManager12()
//        testManager11()
//        testManager10()
//        testManager9()
//        testManager8()
//        testManager7()
//        testManager6()
        testManager5()
//        testManager4()
//        testManager3()
//        testManager2()
//        testManager1()
    }

    fun testManager15(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.ManagerAssistant
        val leaveType = LeaveType.WelfareBuRuLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 0.5f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager14(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.ManagerAssistant
        val leaveType = LeaveType.WelfareBuRuLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 1f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager13(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.Manager
        val leaveType = LeaveType.WelfareBuRuLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 1f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager12(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.Manager
        val leaveType = LeaveType.PersonalLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 1f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager11(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.DeputyManager
        val leaveType = LeaveType.PersonalLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 5f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager10(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.Director
        val leaveType = LeaveType.PersonalLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 5f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager9(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.Group
        val leaveType = LeaveType.PersonalLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 5f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager8(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.Group
        val leaveType = LeaveType.AnnualLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 5f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager7(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.Group
        val leaveType = LeaveType.AnnualLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 0.5f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager6(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.Director
        val leaveType = LeaveType.AnnualLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 5f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager5(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.DeputyManager
        val leaveType = LeaveType.AnnualLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 0.5f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager4(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.DeputyManager
        val leaveType = LeaveType.AnnualLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 1f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }

    fun testManager3(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.ManagermentLayer
        val leaveType = LeaveType.PersonalLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 1f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }


    fun testManager2(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.Manager
        val leaveType = LeaveType.ShiftLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 0.5f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }


    fun testManager1(): Set<ApproveLevel> {
        val employeeLevel = EmployeeLevel.Manager
        val leaveType = LeaveType.AnnualLeave
        val set = ApplyConditionUtil.getApproveLayerList(employeeLevel, leaveType, 1f)
        println("-----start----")
        set.forEach {
            println(it)
        }
        println("-----end------")
        return set
    }


}